package com.example.demo.dto;

import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.example.demo.entity.FinancePay;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import com.example.demo.entity.Customer;
import com.example.demo.entity.Supplier;

/**
 * 付款单 DTO定义
 * @author MyName
 * @version 1.0
 * @date 2024-03-04
 * Copyright © MyCompany
 */
@Getter
@Setter
@Accessors(chain = true)
public class FinancePayDTO extends FinancePay {

    private static final long serialVersionUID = 2778130352752893260L;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindQuery(comparison = Comparison.EQ, entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindQuery(comparison = Comparison.EQ, entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;

    /**
     * 关联字段 名字：Supplier.name
     */
    @BindQuery(comparison = Comparison.EQ, entity = Supplier.class, field = "name", condition = "this.supplier_id=id")
    private String supplierName;
}
